#lang r5rs
(define (montcarlo times experiment)
  (define (once-iter now-time success)
    (if(= 0 now-time)
       (/ success times)
       (once-iter (- now-time 1) (if (experiment)
                                     (+ success 1)
                                     (success)))))
  (once-iter times 0))

(